module.exports = {
    open: false,
    description: '删除会话',
    handler(req, res, next) {
        let doc = req.body;
        let conversationID = doc.conversationID;
        let userID = doc.userID;

        req.mongo.collection("user").updateOne(
            {"_id": userID},
            {$pull: {"conversationIDArray": conversationID}},
            (e, r) => {
                if (e) return res.err.mongoError(e);
                return res.reply("会话删除成功!")
            }
        )
    }
}